﻿<html DIR="LTR" xmlns:tool="http://www.microsoft.com/tooltip" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
  <head>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8" />
    <META NAME="save" CONTENT="history" />
    <title>Report Model Samples</title>
    
 <Style TYPE="text/css">

body
{
    background: #FFFFFF;
    color: #000000;
    font-family:    Verdana;
    font-size: medium;
    font-style: normal;
    font-weight: normal;
    margin-top: 0;
    margin-bottom:  0;
    margin-left:    0;
    margin-right:   0;
    width:  100%;
}

div.#mainSection
{
    font-size: 70%;
    width: 100%;
    padding-left:    10;
    margin-right: 10;
}

div.#mainBody
{
    font-size: 90%;
    margin-top: 10;
    padding-bottom: 20;
}

div.#header
{
    background-color: #D2D2D2;
    padding-top:    0;
    padding-bottom: 0;
    padding-left:   10;
    padding-right:  0;
    width:          100%;
}

div.#header table
{
    border-bottom-color: #C8CDDE;
    border-bottom-style: solid;
    border-bottom-width: 1;
    width:  100%;
}

span.#runningHeaderText
{
    color: #003399;
    font-size: 90%;
}

span.#nsrTitle
{
/*    color: #003399;*/
    font-size: 120%;
    font-weight: 600;
}

div.#header table td
{
    color: #000000;
    font-size: 70%;
    margin-top: 0;
    margin-bottom:  0;
    padding-right: 20;
}

div.#header table tr.#headerTableRow3 td
{
    padding-bottom: 2;
    padding-top: 5;
}

div.#header table.#bottomTable
{
    border-top-color: #FFFFFF;
    border-top-style: solid;
    border-top-width: 1;
    text-align: left;
}

div.#footer
{
    font-size: 90%;
    margin-top: 0;
    margin-bottom:  0;
    margin-left:    -5;
    margin-right:   0;
    padding-top:    2;
    padding-bottom: 2;
    padding-left:   0;
    padding-right:  0;
    width:  100%;
}

hr.#footerHR
{
    border-bottom-color: #EEEEFF;
    border-bottom-style: solid;
    border-bottom-width: 1;
    border-top-color: C8CDDE;
    border-top-style: solid;
    border-top-width: 1;
    height: 3;
    color: #D2D2D2;
}

div.section
{
    padding-top:    2;
    padding-bottom: 2;
    padding-right:  15;
    width:  100%;
}

.heading
{
    color:          #000000;
    font-weight:    bold;
    margin-top:     18;
    margin-bottom:  8;
}

h1.heading
{
    color: #000000;
    font-size:  150%;
}

.subHeading
{
    color:          #000000;
    font-weight:    bold;
    font-size:      150%;
    margin-bottom:  4;
}

h2.subHeading
{
    color:          #000000;
    font-weight:    bold;
    font-size:      130%;
}
h3.subHeading
{
    color:  #000000;
    font-size: 125%;
    font-weight: bold;
}

h4.subHeading
{
    color: #000000;
    font-size: 110%;
    font-weight: bold;
}

h4.procedureHeading
{
    color: #000080;
    font-size: 110%;
    font-weight: bold;
}

h5.subHeading
{
    color: #000000;
    font-size: 100%;
    font-weight: bold;
}

img
{
    padding-bottom: 10;
}

img.toggle
{
    border: 0;
    margin-right: 5;
    padding-bottom: 10;
}

img.copyCodeImage
{
    border: 0;
    margin: 1;
    margin-right: 3;
    padding-bottom: 10;
}

img.downloadCodeImage
{
    border: 0;
    margin-right: 3;
    padding-bottom: 10;
}

img.viewCodeImage
{
    border: 0;
    margin-right: 3;
    padding-bottom: 10;
}

img.note
{
    border: 0;
    margin-right: 3;
    padding-bottom: 10;
}

img.#membersOptionsFilterImage
{
    border: 0;
    margin-left: 10;
    vertical-align: middle;
    padding-bottom: 10;
}

img.#toggleAllImage
{
    margin-left: 4;
    vertical-align: middle;
    padding-bottom: 10;
}

div.#mainSection table
{
    border: 0;
    font-size: 100%;
    width:  100%;
    margin-top: 5px;
    margin-bottom: 15px;
}

div.#mainSection table tr
{
    vertical-align: top;
}

div.#mainSection table th
{
    text-align: left;
    background: #D8D8D8;
    border-bottom-color: #D8D8D8;
    border-bottom-style: solid;
    border-bottom-width: 1;
    color: #000000;
    padding-left: 5;
    padding-right: 5;
}

div.#mainSection table td
{
    background: #F2F2F2;
    border-top-color: #D8D8D8;
    border-top-style: solid;
    border-top-width: 1;
    padding-left: 5;
    padding-right: 5;
}

div.#mainSection table td.imageCell
{
    white-space: nowrap;
}

div.code
{
	width: 98%;
}

div.code table
{
    border: 0;
    font-size: 95%;
    margin-bottom: 5;
    width: 100%
}

div.code table th
{   
    text-align: left;
    background: #D8D8D8;
    border-bottom-color: #D8D8D8;
    border-bottom-style: solid;
    border-bottom-width: 1;
    color: #000000;
    font-weight: bold;
    padding-left: 5;
    padding-right: 5;
}

div.code table td
{
    background: #CCCCCC;
    border-top-color: #D8D8D8;
    border-top-style: solid;
    border-top-width: 1;
    padding-left: 5;
    padding-right: 5;
    padding-top: 5;
}

div.alert
{
	margin-left: 10;
	width: 98%;
}

div.alert table
{
    border: 1;
    font-size: 100%;
    width:  100%;
    border: solid 1 #DEDFEF;
}

div.alert table th
{
    text-align: left;
    background: #D8D8D8;
    border-bottom-width: 0;
    color: #000000;
    padding-left: 5;
    padding-right: 5;
    border: solid 1 #DEDFEF;
}

div.alert table td
{
    background: #FFFFFF;
    border-top-color: #D8D8D8;
    border-top-style: solid;
    border-top-width: 1;
    padding-left: 5;
    padding-right: 5;
    border: solid 1 #DEDFEF;
}

span.copyCode
{
    color: #0000ff;
    font-size: 90%;
    font-weight: normal;
    cursor: hand;
    float: right;
    display: inline;
    text-align: right;
}

.downloadCode
{
    color: #0000ff;
    font-size: 90%;
    font-weight: normal;
    cursor: hand;
}

.viewCode
{
    color: #0000ff;
    font-size: 90%;
    font-weight: normal;
    cursor: hand;
}

div.code pre
{
    font-family:    Monospace, Courier New, Courier;
    font-size: 105%;
    color:  #000000;
}

code
{
    font-family:    Monospace, Courier New, Courier;
    font-size: 105%;
    color:  #000000;
}

dl
{
    margin-top: 0;
    padding-left:   1;
}

dd
{
    margin-bottom:  0;
    margin-left:    0;
    padding-left:   20;
}

dd p
{
    margin-top: 5;
}

ul
{
    margin-left: 17;
    list-style-type: disc;
}

ul ul
{
    margin-bottom: 4;
    margin-left: 17;
    margin-top: 3;
    list-style-type: disc;
}

ol
{
    margin-left: 24;
    list-style-type: decimal;
}

ol ol
{
    margin-left: 24;
    margin-top: 3;
    list-style-type: lower-alpha;
}

li
{
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    padding-top: 0;
    margin-left: 5;
}

p
{
    margin-bottom: 15;
}

.tip
{
    color:  #0000FF;
    font-style: italic;
    cursor:hand;
    text-decoration:underline;
}

.math
{
    font-family: Times New Roman;
    font-size: 125%
}
.sourceCodeList
{
    font-family: Verdana;
    font-size: 90%; 
}

pre.viewCode
{
    width: 100%;
    overflow: auto;
}

li:hover table, li.over table
{
    background-color: #C0C0C0;
}

li:hover ul, li.over ul
{ 
    background-color: #d2d2d2;
    border: 1px solid #000;
    display: block;
}

</style>
  </head>
  <body>
    <!--Topic built:6/7/2007-->

    <div id="header">
      <table width="100%" id="topTable">
        <tr>
          <td align="left">
            <span id="nsrTitle">Report Model Samples</span>
          </td>
          
              
        </tr>
      </table>
      </div>
    <div id="mainSection">
      <div id="mainBody">

        <font color="DarkGray">[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.] </font><p /> 
        <span id="changeHistory">
        </span>
    <p>With SQL Server Reporting Services, you can build semantic models based on SQL Server databases by running Report Model Designer within Business Intelligence Development Studio. After you deploy the model to the report server, you can assign role-based security permissions. Then, your Report Builder users can use the model to build ad hoc reports in Report Builder.</p>
    <p>The AdventureWorks sample report model is shipped with SQL Server. The samples are not installed automatically during setup. For instructions about how to install the samples, see <a href="http://go.microsoft.com/fwlink/?LinkId=67739" alt=""><linkText xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">Installing Samples</linkText></a> in SQL Server Books Online.</p>
    <p>The samples are installed by default at: </p>
    <p>&lt;<i>drive&gt;</i>:\Program Files\Microsoft SQL Server\100\Samples</p>
    <p>
      <b>Note</b>   Business Intelligence (BI) Development Studio is not supported on Itanium-based computers. However, support for BI Development Studio is available for x64-based computers. If the SQL Server sample databases have been deployed on an Itanium-based computer, use BI Development Studio on either an x86-based or x64-based computer to modify and run the samples.</p>
  <h1 class="heading">Scenario</h1><div id="sectionSection0" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <ul xmlns=""><li>
          The purpose of this sample is to show SQL Server Reporting Services Model Designer/Report Builder users how report models are structured and how report models are used in Report Builder. <br></br>
        </li></ul>
    </content></div><h1 class="heading">Languages</h1><div id="sectionSection1" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">Semantic Model Definition Language (SMDL)</p>
    </content></div><h1 class="heading">Features</h1><div id="sectionSection2" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">The AdventureWorks model report sample uses the following features of Reporting Services.</p>
      <h3 class="subHeading" xmlns=""></h3><table width="100%" cellspacing="0" cellpadding="0" border="1" style="background-color: #CCCCCC;" xmlns=""><tr>
            <th>
              Application Area
            </th>
            <th>
              Features
            </th>
          </tr><tr>
          <td>
            <p>
              Reporting Services
            </p>
          </td>
          <td>
            <p>Model Designer</p>
          </td>
        </tr><tr>
          <td>
            <p>
              Reporting Services
            </p>
          </td>
          <td>
            <p>Report Builder</p>
          </td>
        </tr><tr>
          <td>
            <p>
              Reporting Services
            </p>
          </td>
          <td>
            <p>Report Manager</p>
          </td>
        </tr></table>
    </content></div><h1 class="heading">Prerequisites</h1><div id="sectionSection3" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">Before running this sample, make sure the following software is installed:</p>
      <ul xmlns=""><li>
          
            SQL Server, including the following components:<br></br>
          <ul><li>
              
                Reporting Services
              <br></br>
            </li><li>
              
                SQL Server Management Studio<br></br>
            </li><li>
              
                Business Intelligence Development Studio
              <br></br>
            </li><li>
              One sample database: <b>AdventureWorks</b> (data warehouse)<br></br>
            </li></ul>
        </li><li>
          
            Microsoft .NET Framework 2.0 on the computer(s) that you are using to run Model Designer and Report Builder.<br></br>
        </li><li>
          
            Visual Studio. <br></br>
        </li></ul>
      <p xmlns="">In addition, make sure that you have permissions to:</p>
      <ul xmlns=""><li>
          Retrieve data from the <b>AdventureWorks</b> database.<br></br>
        </li><li>
          Publish to the report server.<br></br>
        </li><li>
          Assign role-based security permissions to catalog items.<br></br>
        </li></ul>
    </content></div><h1 class="heading">Opening the AdventureWorks Model</h1><div id="sectionSection4" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">The sample needs to be deployed to a report server. Place the model files in a network location that is accessible to the computer that you intend to run Model Designer on. After it is deployed, you can open the model in the Business Intelligence Development Studio.</p>
      <h4 class="procedureHeading" xmlns="">To open the AdventureWorks model in Model Designer</h4><div id="procedureSectionEBBJBHA" class="section" xmlns=""><ol><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft SQL Server 2008</b> and then click <b>Business Intelligence Development Studio</b>.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">On the <b>File</b> menu, point to <b>Open</b>, and then click <b>Project/Solution</b>.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In Open Project, navigate to the network location where you saved the model files.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">Select the Adventure Works Model.sln file, and then click <b>Open</b>. </p>
            </content>
          </li></ol>
          <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
            <div class="alert" xmlns=""><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note: </th></tr><tr><td>
              Alternatively, you can add the .smdl file to an already existing model by right-clicking the Report Models folder, pointing to <b>Add</b>, and clicking <b>Existing Item</b>. Navigate to the location where you saved the sample files. Select the .smdl file and then click <b>Add</b>. <p></p>
            </td></tr></table><p></p></div>
            <p xmlns="">The sample model is displayed in the Business Intelligence Development Studio window. You can edit the model and .dsv files, save the model to the report server and assign security permissions.</p>
          </content>
        </div>
    </content></div><h1 class="heading">Deploying the Model</h1><div id="sectionSection5" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">When you are finished modifying the model, you need to deploy the model to the report server. </p>
      <h4 class="procedureHeading" xmlns="">To deploy the AdventureWorks model from Model Designer</h4><div id="procedureSectionEBBHBHA" class="section" xmlns=""><ol><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In Solution Explorer, right-click the Adventure Works Model project.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">On the <b>Build</b> menu, click <b>Deploy Report Model Project</b>.</p>
            </content>
          </li></ol>
          <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
            <div class="alert" xmlns=""><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note: </th></tr><tr><td>
              Alternatively, right-click the report model project and select <b>Deploy</b>.<p></p>
            </td></tr></table><p></p></div>
            <p xmlns="">Deployment can take several minutes. If successful, a message is displayed at the bottom of the window indicating the model was successfully deployed. If an error occurred during deployment, a message is displayed indicating the error.</p>
          </content>
        </div>
    </content></div><h1 class="heading">Assigning Permissions to the Model</h1><div id="sectionSection6" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <h4 class="procedureHeading" xmlns="">To assign permissions to the AdventureWorks model in Object Explorer</h4><div id="procedureSectionEBBFBHA" class="section" xmlns=""><ol><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">Click <b>Start</b>, point to <b>All Programs</b>, point to <b>Microsoft SQL Server 2008</b><b> </b>and then click <b>SQL Server Management Studio</b>.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">When prompted, connect to the server where the report model is located.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In Object Explorer, navigate to the model, right-click the model, and click <b>Properties</b>. </p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In the Model Properties page, click <b>Model Security</b>. </p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">Select the <b>Secure individual model items independently of this model</b> check box.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">Click <b>Use these roles for each group or user account</b>.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">Click <b>Add Group or User</b>.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">Select the group or user for which you are creating the role assignment and then click <b>OK</b>. </p>
            </content>
          </li></ol></div>
    </content></div><h1 class="heading">Opening the AdventureWorks Model Sample in Report Builder</h1><div id="sectionSection7" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">After you have saved the report model to the report server and assigned the appropriate permissions to the report, you can open it in Report Builder and create reports.</p>
      <h4 class="procedureHeading" xmlns="">To open the Adventure Works model sample in Report Builder</h4><div id="procedureSectionEBBDBHA" class="section" xmlns=""><ol><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In your Web browser, type the URL for your report server in the address bar. By default, the URL is http://&lt;webservername&gt;/reports.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">Click <b>Report Builder</b>.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In the <b>Getting Started</b> pane, select <b>AdventureWorks</b>, and then click <b>OK</b>.</p>
              <p xmlns="">Your model is displayed in the Explorer pane. </p>
            </content>
          </li></ol></div>
    </content></div><!--[if gte IE 5]>
			<tool:tip element="seeAlsoToolTip" avoidmouse="false"/><tool:tip element="languageFilterToolTip" avoidmouse="false"/><tool:tip element="roleInfoSpan" avoidmouse="false"/>
		<![endif]--></div>
      <div id="footer">
        
			
			© 2007 Microsoft Corporation. All rights reserved.
		</a>
 	
      </div>
    </div>
  </body>
</html>